import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/index/index'
import kpi from '@/components/kpiTree/kpi'
import leaderDrive from '@/components/leaderDrive/index'
import view from "@/components/view/index"
import personalData from '@/components/personalData/index'
import feedBack from '@/components/feedBack/index'
import login from '@/components/login/login'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'login',
            component: login
        },
        {
            path: '/home',
            name: 'home',
            component: home,
            redirect: '/home/view',
            children: [{
                    path: 'view',
                    name: 'view',
                    component: view
                },
                {
                    path: 'leaderDrive',
                    name: 'leaderDrive',
                    component: leaderDrive
                },
                {
                  path:'personalData',
                  name:'personalData',
                  component:personalData
                },
                {
                  path:'feedBack',
                  name:'feedBack',
                  component:feedBack
                },
                {
                    path: 'kpi',
                    name: 'kpi',
                    component: kpi
                }
            ]
        },
    ]
})